require "albacore"
require "fileutils"
require_relative "NuGet"

task :default => [:build]

desc "Builds the entire solution using MsBuild"
msbuild :build => [:nuspec, :version] do |msb|
  msb.properties :configuration => :Debug
  msb.targets :Clean, :Build
  msb.solution = "Patterns.sln"
end

task :nuspec => [:nuspec_patterns, :nuspec_patterns_web, :nuspec_patterns_inversion_all]

desc "Updates the version file with the current version number"
task :version do
  system('_tools\bin\Debug\patterns-tools -cg -t assemblyInfo -o SolutionAssemblyInfo.cs -p "Code Patterns" -v ' + Version::current_version)
end